			<script type="text/javascript">
				$(document).ready(function(){
					$('.list_img').hover(function(){
						$(this).next().show();
					},function(){
						$(this).next().hide();
				})});
			</script>
			
			<h1>Gestion des photos</h1>
			<div class="error">
				<?php echo $error; ?>
				<?php echo validation_errors(); ?>
			</div>
			<?php echo form_open_multipart('admin/upload_photo');?>
				<label for="title">Titre de la photo</label><br/>
				<input type="text" name="title" id="text" value="<?php echo set_value('title'); ?>"/><br/>
				<input type="file" name="photo" size="20" /><br/>
				<input type="submit" value="Ajouter la photo"/>
			<?php echo form_close(); ?>
			<div id="photos_admin">
				<?php foreach($photos as $p): ?>
					<a onclick="if(!confirm('Supprimer la photo ?')) return false;" href="<?php echo site_url('admin/remove_photo/'.$p['id_photo']); ?>" title="Supprimer la photo"><img class="list_img" src="<?php echo base_url().$p['path']; ?>" alt="<?php echo $p['title']; ?>"></img><img style="display:none; position:relative; margin-left:-38px;"src="<?php echo base_url(); ?>/assets/images/remove.png"></img></a>
        		<?php endforeach; ?>
        	</div>
			